package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class Ambush extends Ability {

	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = -6477745913947402231L;

	public Ambush() {
		this.setName("Ambush");
		this.setIconName("ambush");
		this.setResource("Energy");
		this.setCost(15d);
		this.setCooldownMs(15000d);
		this.setDirectDamageType(EDmgType.ENERGY);
		this.setStandardHealthPercentMax(0.329);
		this.setStandardHealthPercentMin(0.329);
		this.setAmountModifierPercent(1.2);
		this.setCoefficient(3.29);
		this.setCastTimeMS(2500d);
		
		this.setTrainableLevel(10);
	}
	
	@Override
	public String getDescription() {
		return "Fires a high-powered shot that deals " 
		+ this.getMinDirect() + " - " + this.getMaxDirect() + " " +
		"weapon damage. Must be in cover to use.";
	}

	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxDirect() {
		return 
			this.getAmountModifierPercent()
			* this.getCharStats().getRangedDamagePrimaryMax()
			
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
			
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

}
